package log;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

public class DateConvert {
	public static void main(String[] args) throws ParseException {
		SimpleDateFormat sourceFormat = new SimpleDateFormat("[dd/MMM/yyyy:HH:mm:ss Z]",Locale.US);
		SimpleDateFormat targetFormat = new SimpleDateFormat("[yyyy-MM-dd HH:mm:ss Z]",Locale.CHINA);
		String dateString = "[05/Aug/2015:14:54:37 +0800]";
		Date date = sourceFormat.parse(dateString);
		System.out.println(targetFormat.format(date));
	}
}
